package dao

import (
	"context"
	"icasset/internal/model"
)

type DemandDAO interface {
	// 新增需求
	AddDemand(ctx context.Context, demand *model.IcDemand) error
	// 根据需求主键查询需求
	GetAllDemands(ctx context.Context) ([]*model.IcDemand, error)
	// 根据需求主键查询需求
	GetDemandByPkid(ctx context.Context, pkid int64) (*model.IcDemand, error)

	GetDemandByUserId(ctx context.Context, userId string) ([]*model.IcDemand, error)

	GetDemandBySellerId(ctx context.Context, sellerId string) ([]*model.IcDemand, error)

	QueryDemandPage(ctx context.Context, pageNum, pageSize int)

	ConfirmDemandByBuyer(ctx context.Context, Pkid int64, FinalPrice float64, DeadlineTime string)

	CancelDemandByBuyer(ctx context.Context, demand *model.IcDemand)
}
